﻿/*
 * This is part of the dotDiff Project
 * 
 * Author: David Rundle (http://www.dbones.co.uk)
 * Project Home: http://www.codeplex.com/DotDiff
 * 
 */

#region Using

using System.Xml;

#endregion

namespace DotDiff
{
    /// <summary>
    /// this will contain information about the difference instance
    /// between the 2 Xml Documents.
    /// </summary>
    public class DiffInstance
    {

        #region Field Members

        private DiffType difference;
        private XmlNode newXml;
        private XmlNode oldXml;
        private string xPath;

        #endregion

        #region Property Members

        /// <summary>
        /// denotes the type of the difference
        /// </summary>
        public DiffType Difference
        {
            get
            {
                return this.difference;
            }
            set
            {
                this.difference = value;
            }
        }

        /// <summary>
        /// the Xml contained in the new doc (only for this single difference)
        /// </summary>
        public XmlNode NewXml
        {
            get
            {
                return this.newXml;
            }
            set
            {
                this.newXml = value;
            }
        }

        /// <summary>
        /// the Xml for the old (origonal) node, note this may be null depending if the node 
        /// exists in both documents
        /// </summary>
        public XmlNode OldXml
        {
            get
            {
                return this.oldXml;
            }
            set
            {
                this.oldXml = value;
            }
        }

        /// <summary>
        /// the xpath of the node/difference
        /// </summary>
        public string XPath
        {
            get
            {
                return xPath;
            }
            set
            {
                this.xPath = value;
            }
        }

        #endregion

    }

}
